import { setStorage } from '@/utils/storage'

export default {
  namespaced: true,
  state () {
    return {
      refresh_token: '',
      token: ''
    }
  },
  mutations: {
    setRefreshToken (state, retoken) {
      state.refresh_token = retoken
      setStorage('refresh_token', retoken)
    },
    setToken (state, token) {
      state.token = token
      setStorage('token', token)
    }
  }
}
